home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / utility / cops608.zip / COPSINCE.DOC < prev    next >
Text File  |  1996-08-26  |  9KB  |  203 lines

  1. COPSINCE.DOC                         1                         Revised: 08-25-96
  2.  
  3. This program looks for all files in a particular subdirectory and copies all new
  4. ones to another subdirectory.  It is  typically  used  to  make  sure  you  have
  5. backups of files while  you're  in  the  middle  of  doing  something  to  them.
  6. Features:
  7.  
  8.   * You can copy all files updated since a given date or within the last
  9.     x-number of days.
  10.   * You can specify that newer files be copied regardless of date restriction
  11.     as long as the older version already exists in the subdirectory.
  12.   * You can define groups of file types, using DOS wildcard specifications
  13.     and copy only, say, text files or word processing files.
  14.  
  15.  
  16. Specifying parameters:
  17.  
  18. Parameters for this program can be set in the following ways.  The last  setting
  19. encountered always wins:
  20.   - Read from an *.INI file (see BRUCEINI.DOC file),
  21.   - Through the use of an environmental variable (SET COPSINCE=whatever), or
  22.   - From the command line (see "Syntax" below)
  23.  
  24.  
  25. Defining your own file specifications:
  26.  
  27. You can create your own file specifications for  copying  purposes.   Typically,
  28. this is done using an *.INI file (see BRUCEINI.DOC file) but it can also be done
  29. from the command line.
  30.  
  31. These definition specifications are made using the following syntax:
  32.  
  33.         /DEF filetype=filespecs
  34.  
  35. For example, if you want to specify a new grouping "WP", you can  define  it  to
  36. include something like the following:
  37.  
  38.         /DEF WP=*.WP *.WP5
  39.  
  40. Up to 20 file specifications can be made for a given group.   Your  COPSINCE.INI
  41. file can contain up to 10 groupings.  Once the group is defined,  you  can  then
  42. specify the name of the group on the command line and those are the  files  that
  43. will be grabbed.  By default, only two  file  types  are  defined  and  you  can
  44. override both of these if desired:
  45.  
  46.         /DEF ALL=*.*
  47.         /DEF TEXT=*.BAS *.BAT *.BI *.C *.DOC *.H *.REF *.SAS *.SC *.TEK *.TXT
  48.  
  49. Win95 notice:  As with most DOS-based utilities, this program doesn't understand
  50. the weird subdirectories and filenames that are possible under Windows 95.
  51.  
  52.  
  53. COPSINCE.DOC                         2                         Revised: 08-25-96
  54.  
  55. Syntax:
  56.  
  57.     COPSINCE [ [ /FROM ] from_dir | from_dir\filespec ] [ /TO to_dir ]
  58.       [ /COPY date | /COPY -n ] [ /-A ] [ /-R ] [ /CLONE ] [ /-4DOS ]
  59.       [ /ALL | /TEXT | /filetype ] [ /DEF filetype=spec [ spec ]... ]
  60.       [ /BEEP ] [ /MONO ] [ /Iinitfile | /-I ] [ /? ]
  61.  
  62. where:
  63.  
  64. "from_dir" (or "/FROM from_dir") is the subdirectory name in  which  the  source
  65. files are found.  Can provide drive and path information if  desired.   Defaults
  66. to  the  current  subdirectory.   Alternatively,  you  can  specify  a  filespec
  67. including wildcards to limit the activity to one group of files.  If you specify
  68. a filespec, it overrides any /ALL, /TEXT, /filetype specifications.
  69.  
  70. "/TO to_dir" (or just "to_dir") is the destination to which to copy  the  files.
  71. Can provide drive and  path  information  if  desired.   Initially  defaults  to
  72. "/TO=A:\".  The equal sign is optional.
  73.  
  74. "/COPY date" (or "date") specifies the  date  from  which  you  want  all  files
  75. copied.  Initially defaults to today's date (e.g. "/COPY 06-23-96").   The  date
  76. should be in whatever national date format you have set for your computer.
  77.  
  78. "/COPY -n" (or "-n") says to copy all files updated  in  the  last  n-number  of
  79. days.  Initially defaults to "/COPY -0"; all files created today only.
  80.  
  81. "/-A" says to copy files only if they are already in the output directory.  This
  82. is the opposite of the /A (add) function which is initially the default.   "/-A"
  83. used in combination with "/-R" would exclude all files from consideration and is
  84. not allowed.
  85.  
  86. "/A" copies files even if they do not exist already  in  the  output  directory.
  87. Unlike with DOS's REPLACE command, "/A" and "/R"  are  not  mutually  exclusive.
  88. "/A" is initially the default.
  89.  
  90. "/-R" says to copy files only if  they  do  not  exist  already  in  the  output
  91. directory.  This is the opposite of the /R (replace) function which is initially
  92. the default.  "/-R" used in combination with "/-A" would exclude all files  from
  93. consideration and is not allowed.
  94.  
  95. "/R" copies files even if they already exist in the  output  directory.   Unless
  96. /CLONE is specified, only files which are newer in the source subdirectory  will
  97. be copied.  Unlike with DOS's REPLACE command, "/A" and "/R"  are  not  mutually
  98. exclusive.  "/R" is initially the default.
  99.  
  100. "/CLONE" specifies that files should be copied to the output directory  even  if
  101. the files in the output  directory  are  newer  than  the  ones  in  the  source
  102. directory.  "/-CLONE" (the opposite) is initially the default.
  103.  
  104. "/-CLONE" says to only copy files to output directory if the files in the output
  105. subdirectory are older than those found in  the  input  subdirectory.   This  is
  106. initially the default.
  107.  
  108.  
  109. COPSINCE.DOC                         3                         Revised: 08-25-96
  110.  
  111. "/4DOS" says to respect 4DOS conventions vis-a-vis the DESCRIPT.ION file.   File
  112. descriptions from the DESCRIPT.ION file in the input path are added to those (if
  113. any) in the DESCRIPT.ION file in the output path.  4DOS is  copyrighted  by  Rex
  114. Conn and JP Software Inc.  The COPSINCE  program  initially  determines  whether
  115. 4DOS is loaded or not and acts appropriately.  The "/4DOS" switch says to  force
  116. 4DOS adherence whether it's loaded or not.
  117.  
  118. "/-4DOS" says to  ignore  4DOS  conventions  vis-a-vis  the  DESCRIPT.ION  file.
  119. Initially, the conventions are ignored only if 4DOS is not currently loaded.
  120.  
  121. "/ALL" says to take all files (initially, a file specification of *.*).
  122.  
  123. "/TEXT" restricts copying to only those files that  are  known  to  be  straight
  124. ASCII files.  Initially, this is defined as any files  which  meet  any  of  the
  125. following file specifications:
  126.  
  127.         *.BAS *.BAT *.BI *.C *.DOC *.H *.REF *.SAS *.SC *.TEK *.TXT
  128.  
  129. Initially, the routine grabs the /TEXT specification by default.
  130.  
  131. "/filetype" allows you to invoke your own file specification.  You might want to
  132. have something like /WP (for *.WP *.WP5 etc files) or  whatever.   You  have  to
  133. define this filetype using a /DEF filetype statement.
  134.  
  135. "/DEF filetype=spec [ spec ]" allows you to create your own file specifications.
  136. Typically, this would be specified in your initfile.   See  "Defining  your  own
  137. file specifications" above.
  138.  
  139. "/BEEP" gives you a beep when  the  program  finishes.   Initially  defaults  to
  140. "/-BEEP".
  141.  
  142. "/-BEEP" does not beep  when  the  program  finishes.   This  is  initially  the
  143. default.
  144.  
  145. "/MONO" (or "/-COLOR") does  not  try  to  override  screen  colors.   Initially
  146. defaults to "/COLOR".
  147.  
  148. "/COLOR" (or "/-MONO") allows screen colors to be overridden.  This is initially
  149. the default.
  150.  
  151. "/Iinitfile" says to read an initialization file with the file name  "initfile".
  152. The file specification *must* contain a period.  Initfiles are described in  the
  153. BRUCEINI.DOC file.  Initially defaults to "/ICOPSINCE.INI".
  154.  
  155. "/-I" (or "/INULL") says to skip loading the initialization file.
  156.  
  157. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  158.  
  159.  
  160.  
  161. COPSINCE.DOC                         4                         Revised: 08-25-96
  162.  
  163. Return codes:
  164.  
  165. COPSINCE returns the following ERRORLEVEL codes:
  166.  
  167.         0 = no problems
  168.       250 = operation aborted by pressing Escape
  169.       255 = syntax problems, or /? requested
  170.  
  171.  
  172. Author:
  173.  
  174. This program was written by Bruce Guthrie of Wayne Software.  It is free for use
  175. and redistribution provided relevant documentation is kept with the program,  no
  176. changes are made to the program or documentation, and it  is  not  bundled  with
  177. commercial programs or charged for separately.  People who need to bundle it  in
  178. for-sale packages must pay a $50 registration fee to  "Wayne  Software"  at  the
  179. following address.
  180.  
  181. Additional information about this and other Wayne Software programs can be found
  182. in the file BRUCEymm.DOC which should be included  in  the  original  ZIP  file.
  183. ("ym